package com.zhongketech.sunflower.database;

import java.util.ArrayList;
import java.util.List;

import u.aly.E;
import u.aly.T;

import com.zhongketech.sunflower.IUpdateCallback;
import com.zhongketech.sunflower.util.Constants;
import com.zhongketech.sunflower.util.Utilities;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

/**
 * 数据保存
 * @author 905904
 *
 */
public final class DataApi {

	/**
	 * 宏定义
	 */
	private static final String TAG = "Data";

	public static final String DATATYPE_UNINSTALLAPP = "UninstallApp";
	public static final String DATATYPE_UNSTARTAPP = "UnstartApp";
	public static final String DATATYPE_BLOCKCALL = "BlockCall";
	public static final String DATATYPE_BLOCKSMS = "BlockSMS";

	/**
	 * 数据定义
	 */


	private static List<ApplicationDataImpl> uninstallAppList = new ArrayList<ApplicationDataImpl>();
	private static List<ApplicationDataImpl> unstartAppList = new ArrayList<ApplicationDataImpl>();
	private static List<PhoneNumberDataImpl> blockCallList = new ArrayList<PhoneNumberDataImpl>();
	private static List<PhoneNumberDataImpl> blockSms = new ArrayList<PhoneNumberDataImpl>();


	
	public static int add(String dataType,IDataItem item)
	{
		if(null == item)
		{
			return Constants.ITEM_ERROR;
		}



		switch (item.getStatus(item)) {
		case Constants.ITEM_EXISTS:

			return Constants.ITEM_EXISTS;
		case Constants.ITEM_ADD:

			return Constants.ITEM_ADD;
		case Constants.ITEM_UPDATE:

			return Constants.ITEM_UPDATE;
		default:
			break;
		}

		return Constants.ITEM_EXISTS;
	}


}
